import request from '@/utils/request'

// 获取首页统计指标配置
export function getIndexStatistics() {
  return request({
    url: '/dispatch/dispatch/dispatchOther/getIndexStatistics',
    method: 'get'
  })
}

// 保存首页统计指标配置
export function saveIndexStatistics(data) {
  return request({
    url: '/dispatch/dispatch/dispatchOther/saveIndexStatistics',
    method: 'post',
    data
  })
}

// 获取管网合格率配置
export function getNetWorkQualifiedRate() {
  return request({
    url: '/dispatch/dispatch/dispatchOther/getNetWorkQualifiedRate',
    method: 'get'
  })
}

// 保存管网合格率配置
export function saveNetWorkQualifiedRate(data) {
  return request({
    url: '/dispatch/dispatch/dispatchOther/saveNetWorkQualifiedRate',
    method: 'post',
    data
  })
}

// 获取压力报警配置
export function getPressureAlarm() {
  return request({
    url: '/dispatch/dispatch/dispatchOther/getPressureAlarm',
    method: 'get'
  })
}

// 保存压力报警配置
export function savePressureAlarm(data) {
  return request({
    url: '/dispatch/dispatch/dispatchOther/savePressureAlarm',
    method: 'post',
    data
  })
}

// 获取阶梯电价配置
export function getLadderElectricityPrice() {
  return request({
    url: '/dispatch/dispatch/dispatchOther/getLadderElectricityPrice',
    method: 'get'
  })
}

// 保存阶梯电价配置
export function saveLadderElectricityPrice(data) {
  return request({
    url: '/dispatch/dispatch/dispatchOther/saveLadderElectricityPrice',
    method: 'post',
    data
  })
}

// 删除阶梯电价配置
export function deleteLadderElectricityPrice(id) {
  return request({
    url: '/dispatch/dispatch/dispatchOther/deleteLadderElectricityPrice',
    method: 'delete',
    params: { id }
  })
}

// 获取区域级联列表
export function getAdministrativeAreaList() {
  return request({
    url: '/dispatch/dispatch/dispatchOther/getAdministrativeAreaList',
    method: 'get'
  })
}

// 查询行政区域配置列表
export function getAdministrativeArea() {
  return request({
    url: '/dispatch/dispatch/dispatchOther/getAdministrativeArea',
    method: 'get'
  })
}

// 新增/保存行政区域配置
export function saveAdministrativeArea(data) {
  return request({
    url: '/dispatch/dispatch/dispatchOther/saveAdministrativeArea',
    method: 'post',
    data
  })
}

// 获取首页统计指标配置下拉列表
export function getIndexStatisticsSelectList() {
  return request({
    url: '/dispatch/dispatch/dispatchOther/getIndexStatisticsDropdown',
    method: 'get'
  })
}

// 获取区域级联列表
export function getAdministrativeAreaSelectList() {
  return request({
    url: '/dispatch/dispatch/dispatchOther/getAdministrativeAreaList',
    method: 'get'
  })
}

// 删除行政区域配置
export function deleteAdministrativeArea(id) {
  return request({
    url: '/dispatch/dispatch/dispatchOther/deleteAdministrativeArea',
    method: 'delete',
    params: { id }
  })
}